<template>
	<view class="">
		<view class="" style="margin: 30rpx;color: #9c9c9c;">
			物资名称：{{mc}}
		</view>
		<uni-steps v-if="list2.length" :options="list2"  :active="active" direction="column" />
		<view class="no-data" v-else style="text-align: center;">
		<image src="../../static/icons/nodata.png" style="width: 150rpx;" mode="widthFix"></image>
		<text>暂无盘点记录</text>
	</view>
	</view>
</template>

<script>
	import { InventoryRecords } from '../../api/goods.js'
	export default {
		data() {
			return {
				active:-1,
				list2: [],
				wzId:null,
				mc:null
			};
		},
		onLoad(option){
			this.wzId=JSON.parse(option.data).wzId
			this.mc=JSON.parse(option.data).mc
			console.log(this.mc);
			this.InventoryRecord()
		},
		methods:{
			InventoryRecord(){
				InventoryRecords(this.wzId).then(res=>{
					res.rows.forEach((item,index)=>{
						var query={
							title: '盘点人：'+item.createBy,
							desc: '盘点时间：'+item.createTime+
							'\n盘点前数量：'+item.qsl+
							'\n盘点后数量：'+item.hsl+
							'\n备注：'+item.bz
						}
						this.list2.push(query)
					})
				})
			}
		}
	}
</script>

<style lang="scss">
.no-data {
	position: absolute;
	top: 0rpx;
	left: 0;
	right: 0;
	bottom: 0;
	color: #333333;
	width: 100%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}
</style>